package com.myTimeUtils.android.TimeTracker.System;
import com.myTimeUtils.android.TimeTracker.Schedule.Time;
import java.util.*;
/**
 * Implements system time information.
 *
 * @author Joseph Walker
 */
public class ConcreteSystemTime implements SystemTime{
	/**
	 * Gets the day number.
	 *
	 * @return	the day number
	 */
	public int getDay(){ 
		switch( new GregorianCalendar().get(Calendar.DAY_OF_WEEK)){
			case Calendar.MONDAY: 		return Time.MONDAY;
			case Calendar.TUESDAY: 		return Time.TUESDAY;
			case Calendar.WEDNESDAY:	return Time.WEDNESDAY; 
			case Calendar.THURSDAY: 	return Time.THURSDAY;
			case Calendar.FRIDAY: 		return Time.FRIDAY;
			case Calendar.SATURDAY: 	return Time.SATURDAY;
			case Calendar.SUNDAY: 		return Time.SUNDAY;
			default:			return -1;	
		}
	}
	/**
	 * Gets the hour number.
	 *
	 * @return	the hour number	
	 */
	public int getHour(){ return new GregorianCalendar().get(Calendar.HOUR_OF_DAY); }
	/**
	 * Gets the minute number.
	 *
	 * @return	the minute number
	 */
	public int getMinute(){ return new GregorianCalendar().get(Calendar.MINUTE); }
	/**
	 * Gets the second number.
	 *
	 * @return	the second number
	 */
	public int getSecond(){ return new GregorianCalendar().get(Calendar.SECOND); }
}
